package roslan.musicbox.client.ui.musiclist;

import java.awt.Component;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;


class MusicListItemRenderer 
implements TableCellRenderer{
	private TableCellRenderer originalRenderer;
	public MusicListItemRenderer(TableCellRenderer renderer){
		this.originalRenderer = renderer;
	}
	public Component getTableCellRendererComponent(JTable table, Object value,
			boolean isSelected, boolean hasFocus, int row, int column) {
		JLabel label = (JLabel)(
				originalRenderer.getTableCellRendererComponent(
				table, "xxx", isSelected, hasFocus, row, column));
		UIMusicListItem item = (UIMusicListItem)value;
		item.setBackground(label.getBackground());
		return item;
	}
}